package com.xhtt.modules.task.dao;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.xhtt.modules.task.entity.TaskCarPlan;
import com.xhtt.modules.task.entity.TaskCarTask;
import com.xhtt.modules.task.model.car.CarTaskListModel;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * <p>
 * 排车任务-主任务 Mapper 接口
 * </p>
 *
 * @author feipc
 * @since 2019-02-26
 */
public interface TaskCarTaskMapper extends BaseMapper<TaskCarTask> {

    List<CarTaskListModel> taskList(Page<CarTaskListModel> page, @Param(value = "ps") Map<String, Object> params);

    List<Map<String, Object>> getWaitingCount(@Param(value = "standId") Integer standId);

    int getLoadingCount(@Param(value = "standId") Integer standId);

    List<TaskCarPlan> taskWorkingList(Page<TaskCarPlan> page, @Param(value = "ps") Map<String, Object> params);

    TaskCarPlan getWaitingTask(@Param(value = "standId") Integer standId);

    List<TaskCarPlan> getAllWaitingTasks();

    List<TaskCarTask> shiftsList(@Param(value = "selfId") Integer selfId, @Param(value = "taskIdList") List<Integer> taskIdList);

    List<Map<String,Object>> carForUser(@Param(value = "ps") Map<String,Object> params);

    List<Map<String,Object>> carForStand(@Param(value = "ps")Map<String,Object> params);
}
